<!-- Dettagli del ticket-->
<div id="table">
    <blockquote>

        <H2>&raquo; Ticket</H2>

        <?php
        //Stampa di tutti i ticket presenti
        $utente = unserialize($_SESSION["user"]);

        $result = mysql_query("SELECT ticket.id, nome, data, descrizione, id_users, mail, stato.nome_stato, nome_priorita
                               FROM ticket, stato, priorita where ticket.id_stato = stato.id and ticket.id_priorita = priorita.id");

        //        $data = date($row['data'],'d,m,y');

        echo "<table><tr>";
        echo "<th>No.</th>";
        echo "<th>Nome</th>";
        echo "<th>Data</th>";
        echo "<th>Descrizione</th>";
        echo "<th>Id_user</th>";
        echo "<th>Mail</th>";
        echo "<th>Priorit&agrave;</th>";
        echo "<th>Apri</th></tr>";

        while($row = mysql_fetch_array($result)) {
            //$data = split(" ", $row['data']);
                $data = date("y-m-d",strtotime($row['data']));
            echo "<tr>";
            echo "<td color='green'>".$row['id']."</td>";
            //echo "<td>".$row['data']."</td>";
            echo "<td>".$row['nome']."</td>";
            //echo "<td>".$data[0]."</td>";
            echo "<td>".$data."</td>";
            echo "<td>".$row['descrizione']."</td>";
            echo "<td>".$row['id_users']."</td>";
            echo "<td>".$row['mail']."</td>";
            echo "<td>".$row['nome_priorita']."</td>";
            echo "<td><a href='ticket_admin.php?action=ticketInfo&id=".$row['id']."'>Vai</a></td>";
            echo "</tr>";
        }

        echo "</table>";
        ?>


    </blockquote>
</div>